#ifndef TASKWIDGET_H
#define TASKWIDGET_H

#include <QtWidgets>
#include "backuptask.h"
#include "instancewidget.h"

class TaskWidget : public QWidget
{
    Q_OBJECT
public:
    explicit TaskWidget(QSharedPointer<BackupTask> task_, QWidget *parent = 0);
    
    QSharedPointer<BackupTask> getTask();
    QListWidget *getList();
    QDateTime getSelectedInstance();
    bool taskInstanceSelected();
private:
    QSharedPointer<BackupTask> task;
    QListWidget *list;
signals:
    void removeTaskClicked();
    void removeInstanceClicked(QDateTime timestamp);
public slots:
};

#endif // TASKWIDGET_H
